import tool from "@/utils/tool";
// store/index.ts
import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
	state: () => {
		return {
			userSecret: tool.data.get("USER_INFO"),
		}
	},
	// 同步异步皆可
	actions: {
		setUserSecret(payload: any) {
			this.userSecret = payload;
			tool.data.set("USER_INFO", payload);
		}
	},
})
